#include <stdio.h>
#include <signal.h>

typedef void (*sighandler_t)(int);

void my_handler(int signal);

int main(void)
{
    int pid,ppid;

    signal(SIGINT, (sighandler_t) my_handler);

    printf("inside son3:\n");
    pid=getpid();
    ppid=getppid();
    printf("SON3 PARAM:  pid=%i  ppid=%i \n",pid,ppid);

    sleep(10);

    return 0;
}

void my_handler(int signal)
{
    printf("signal #%d was catched\n", signal);
    return;
}



